<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    info: { type: Object, required: true },
  },
});
</script>

<template>
  <view class="guider-item">
    <image class="guider-item-img" :src="info.avatar_url" mode="aspectFill" />
    <view style="display: flex; align-items: center">
      <view class="guider-item-name">{{ info.nickname }}</view>
      <view class="guider-item-city">{{ info.city_name }}</view>
      <view class="guider-item-tag">
        <view class="guider-item-tag2" v-for="i of info.tag_arr" :key="i">
          {{ i }}
        </view>
      </view>
    </view>
    <view class="guider-item-intro">
      <image
        class="guider-item-dot"
        src="@/package/guider/static/star-list-dot.png"
      />
      <view class="guider-item-text">{{ info.guider_tips }}</view>
    </view>
  </view>
</template>

<style lang="scss">
.guider-item {
  position: relative;
  padding: 10rpx 20rpx 12rpx 152rpx;
  border-radius: 20rpx;
  background-color: #ffffff;

  .guider-item-img {
    position: absolute;
    left: -20rpx;
    top: -20rpx;
    width: 140rpx;
    height: 140rpx;
    border-radius: 30rpx;
    border: 2rpx solid #eeeeee;
  }

  .guider-item-name {
    flex-shrink: 0;
    font-size: 28rpx;
    color: #333333;
    line-height: 40rpx;
    font-weight: bold;
  }

  .guider-item-city {
    flex-shrink: 0;
    margin-left: 10rpx;
    margin-right: 24rpx;
    font-size: 24rpx;
    color: #666666;
    line-height: 34rpx;
  }

  .guider-item-tag {
    display: flex;
    flex-wrap: wrap;
    flex-grow: 1;
    min-width: 0;
    height: 28rpx;
    overflow: hidden;
  }

  .guider-item-tag2 {
    flex-shrink: 0;
    padding: 0 8rpx;
    margin-right: 10rpx;
    font-size: 20rpx;
    color: #1bc76f;
    line-height: 24rpx;
    border-radius: 18rpx;
    border: 2rpx solid rgba(64, 193, 127, 0.34);
    background-color: #f4f8f6;
  }

  .guider-item-intro {
    position: relative;
    padding: 10rpx 20rpx 14rpx;
    margin-top: 10rpx;
    border-radius: 10rpx;
    background-color: #fbfbfb;
  }

  .guider-item-dot {
    position: absolute;
    top: 10rpx;
    right: 20rpx;
    width: 28rpx;
    height: 18rpx;
  }

  .guider-item-text {
    max-height: 64rpx;
    font-size: 22rpx;
    color: #666666;
    line-height: 32rpx;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}
</style>
